{extend name="layout" /}
{block name="head_meta"}
    <link rel="canonical" href="https://{$site_domain}{:get_full_url_by_uri($current_lang)}" />
{/block}
{block name="content"}
<!-- Hero Section -->
<section class="hero-section text-white">
    <div class="container mx-auto px-4 py-0 md:py-10">
        <div class="text-center mb-10">
            <h1 class="text-4xl md:text-6xl font-bold mb-6 leading-tight">{$Think.lang.hero_title}</h1>
        </div>
        
        <div class="search-container mx-auto">
            <div class="mb-6 text-center">
                <div class="text-cyan-100 text-sm">
                    <p class="font-medium mb-1">{$Think.lang.search_tip_title}</p>
                    <p class="mb-1">{$Think.lang.search_tip_chinese}</p>
                    <p class="text-cyan-200">{$Think.lang.search_tip_example}</p>
                </div>
            </div>
            
            <div class="bg-white rounded-2xl shadow-2xl p-6 backdrop-blur-sm">
                <div class="space-y-4">
                    <input type="text" id="search-input" class="w-full px-6 py-4 rounded-xl focus:outline-none focus:ring-2 focus:ring-cyan-500 text-gray-800 text-lg border border-gray-200" placeholder="{$Think.lang.search_placeholder}">
                    <button id="search-button" class="w-full bg-cyan-500 hover:bg-cyan-600 text-white px-8 py-4 rounded-xl transition duration-300 font-semibold shadow-lg hover:shadow-xl flex items-center justify-center space-x-2">
                        <i class="fas fa-search"></i>
                        <span>{$Think.lang.search}</span>
                    </button>
                </div>
            </div>
            
            <div class="mt-6 text-center">
                <div class="bg-yellow-100 border border-yellow-300 rounded-xl p-4 mb-4 inline-block">
                    <p class="text-yellow-800 font-medium flex items-center justify-center">
                        <i class="fas fa-info-circle mr-2 text-yellow-600"></i>
                        {$Think.lang.search_notice}
                    </p>
                </div>
            </div>
            
            {notempty name="recommended_searches"}
            <div class="mt-6 text-center">
                <p class="mb-3 text-cyan-100 font-medium">{$Think.lang.recommended_searches}:</p>
                <div class="flex flex-wrap justify-center gap-3">
                    {foreach $recommended_searches as $search}
                    <a href="javascript:;" class="recommended-search bg-white bg-opacity-20 hover:bg-opacity-30 px-4 py-2 rounded-full text-sm transition duration-300 backdrop-blur-sm border border-white border-opacity-20" data-keyword="{$search.keyword}">{$search.keyword}</a>
                    {/foreach}
                </div>
            </div>
            {/notempty}
        </div>
    </div>
</section>

<section class="container mx-auto px-4 py-8">
    <div id="search-results" class="hidden">
        <h2 class="text-3xl font-bold mb-6 text-center">{$Think.lang.search_result}</h2>
        <div id="results-container" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 px-0 md:px-4">
        </div>
        <div id="no-results" class="text-center py-8 hidden">
            <p class="text-xl text-gray-500">{$Think.lang.no_result}</p>
        </div>
    </div>
</section>

<section class="container mx-auto px-4 py-12">
    <div class="text-center mb-12">
        <h2 class="text-3xl md:text-4xl font-bold mb-4 gradient-text">{$Think.lang.featured_lyrics}</h2>
        <p class="text-gray-600 text-lg max-w-2xl mx-auto">Discover popular songs with accurate pinyin annotations to enhance your pronunciation learning</p>
    </div>
    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
        {foreach $featured_lyrics as $lyric}
        <div class="bg-white rounded-2xl shadow-lg hover:shadow-2xl transition-all duration-300 border border-gray-100 hover:border-cyan-200 group lyric-card overflow-hidden">
            <a href="{:get_full_url_by_uri($current_lang,'lyrics/'. rawurlencode($lyric.title_uri))}" class="block h-full">
                <div class="p-6">
                    <div class="flex items-start justify-between mb-4">
                        <div class="flex-1">
                            <h3 class="text-xl font-bold text-gray-800 mb-2 group-hover:text-cyan-600 transition-colors line-clamp-2">{$lyric.title_pinyin} ({$lyric.title})</h3>
                            <p class="text-gray-600 font-medium group-hover:text-cyan-500 transition-colors">{$lyric.artist_pinyin}</p>
                        </div>
                        <div class="ml-4 flex-shrink-0">
                            <div class="w-12 h-12 bg-gradient-to-br from-cyan-500 to-blue-600 rounded-full flex items-center justify-center text-white group-hover:from-cyan-600 group-hover:to-blue-700 transition-all shadow-lg">
                                <i class="fas fa-music text-lg"></i>
                            </div>
                        </div>
                    </div>
                    
                    <div class="text-gray-500 text-sm mb-6 leading-relaxed line-clamp-3 group-hover:text-gray-600 transition-colors">
                        {$lyric.description}
                    </div>
                </div>
                
                <div class="px-6 pb-6">
                    <div class="flex justify-between items-center pt-4 border-t border-gray-100">
                        <div class="flex items-center space-x-4 text-sm text-gray-500">
                            <span class="flex items-center">
                                <i class="far fa-eye mr-1"></i> 
                                {$lyric.views}
                            </span>
                            <span class="flex items-center">
                                <i class="far fa-heart mr-1"></i> 
                                {$lyric.likes}
                            </span>
                        </div>
                        <span class="text-cyan-600 font-semibold text-sm flex items-center group-hover:translate-x-1 transition-transform">
                            {$Think.lang.lyrics} 
                            <i class="fas fa-arrow-right text-xs ml-2"></i>
                        </span>
                    </div>
                </div>
            </a>
        </div>
        {/foreach}
    </div>
</section>

<section class="bg-gradient-to-br from-slate-50 to-cyan-50 py-16">
    <div class="container mx-auto px-4">
        <div class="text-center mb-12">
            <h2 class="text-3xl md:text-4xl font-bold mb-4 gradient-text">{$Think.lang.latest_lyrics}</h2>
            <p class="text-gray-600 text-lg max-w-2xl mx-auto">Recently added songs with fresh pinyin annotations</p>
        </div>
        <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
            {foreach $latest_lyrics as $lyric}
            <div class="bg-white rounded-xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-cyan-200 group lyric-card">
                <a href="{:get_full_url_by_uri($current_lang,'lyrics/'. rawurlencode($lyric.title_uri))}" class="block p-5 h-full">
                    <div class="flex items-center mb-4">
                        <div class="w-10 h-10 bg-gradient-to-br from-cyan-500 to-blue-600 rounded-xl flex items-center justify-center text-white mr-3 flex-shrink-0 group-hover:from-cyan-600 group-hover:to-blue-700 transition-all">
                            <i class="fas fa-music text-sm"></i>
                        </div>
                        <div class="flex-1 min-w-0">
                            <h3 class="text-sm font-bold text-gray-800 group-hover:text-cyan-600 transition-colors truncate">{$lyric.title_pinyin} ({$lyric.title})</h3>
                            <p class="text-gray-600 text-xs truncate group-hover:text-cyan-500 transition-colors">{$lyric.artist_pinyin}</p>
                        </div>
                    </div>
                    
                    <div class="flex justify-between items-center pt-3 border-t border-gray-100">
                        <div class="text-gray-500 text-xs flex items-center">
                            <i class="far fa-eye mr-1"></i> 
                            {$lyric.views}
                        </div>
                        <span class="text-cyan-600 font-semibold text-xs flex items-center group-hover:translate-x-1 transition-transform">
                            View
                            <i class="fas fa-arrow-right text-xs ml-1"></i>
                        </span>
                    </div>
                </a>
            </div>
            {/foreach}
        </div>
        <div class="text-center mt-10">
            <a href="{:get_full_url_by_uri($current_lang,'list')}" class="inline-flex items-center bg-gradient-to-r from-cyan-500 to-blue-600 hover:from-cyan-600 hover:to-blue-700 text-white px-8 py-4 rounded-xl transition duration-300 btn-hover-effect font-semibold shadow-lg hover:shadow-xl">
                {$Think.lang.all_lyrics} 
                <i class="fas fa-arrow-right ml-3"></i>
            </a>
        </div>
    </div>
</section>

<section class="py-20">
    <div class="container mx-auto px-4">
        <div class="text-center mb-16">
            <h2 class="text-3xl md:text-4xl font-bold mb-4 gradient-text">Why Choose LyricsPinyin.net?</h2>
            <p class="text-gray-600 text-lg max-w-3xl mx-auto">Experience the most comprehensive pinyin lyrics platform designed for perfect pronunciation learning</p>
        </div>
        <div class="grid grid-cols-1 md:grid-cols-3 gap-10">
            <div class="bg-white rounded-2xl shadow-lg p-8 text-center feature-card border border-gray-100 hover:border-cyan-200 transition-all duration-300">
                <div class="w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-cyan-500 to-blue-600 rounded-2xl flex items-center justify-center shadow-lg">
                    <i class="fas fa-language text-white text-3xl"></i>
                </div>
                <h3 class="text-xl font-bold mb-4 text-gray-800">{$Think.lang.feature_title_1}</h3>
                <p class="text-gray-600 leading-relaxed">{$Think.lang.feature_desc_1}</p>
                <div class="mt-6 flex justify-center space-x-4 text-sm text-gray-500">
                    <span class="flex items-center">
                        <i class="fas fa-check-circle text-green-500 mr-1"></i>
                        {$Think.lang.feature_professional_annotation}
                    </span>
                    <span class="flex items-center">
                        <i class="fas fa-check-circle text-green-500 mr-1"></i>
                        {$Think.lang.feature_accurate_tones}
                    </span>
                </div>
            </div>
            
            <div class="bg-white rounded-2xl shadow-lg p-8 text-center feature-card border border-gray-100 hover:border-cyan-200 transition-all duration-300">
                <div class="w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-emerald-500 to-cyan-600 rounded-2xl flex items-center justify-center shadow-lg">
                    <i class="fas fa-brain text-white text-3xl"></i>
                </div>
                <h3 class="text-xl font-bold mb-4 text-gray-800">{$Think.lang.feature_title_2}</h3>
                <p class="text-gray-600 leading-relaxed">{$Think.lang.feature_desc_2}</p>
                <div class="mt-6 flex justify-center space-x-4 text-sm text-gray-500">
                    <span class="flex items-center">
                        <i class="fas fa-bolt text-yellow-500 mr-1"></i>
                        {$Think.lang.feature_instant_response}
                    </span>
                    <span class="flex items-center">
                        <i class="fas fa-target text-blue-500 mr-1"></i>
                        {$Think.lang.feature_precise_matching}
                    </span>
                </div>
            </div>
            
            <div class="bg-white rounded-2xl shadow-lg p-8 text-center feature-card border border-gray-100 hover:border-cyan-200 transition-all duration-300">
                <div class="w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-purple-500 to-pink-600 rounded-2xl flex items-center justify-center shadow-lg">
                    <i class="fas fa-gift text-white text-3xl"></i>
                </div>
                <h3 class="text-xl font-bold mb-4 text-gray-800">{$Think.lang.feature_title_3}</h3>
                <p class="text-gray-600 leading-relaxed">{$Think.lang.feature_desc_3}</p>
                <div class="mt-6 flex justify-center space-x-4 text-sm text-gray-500">
                    <span class="flex items-center">
                        <i class="fas fa-heart text-red-500 mr-1"></i>
                        {$Think.lang.feature_completely_free}
                    </span>
                    <span class="flex items-center">
                        <i class="fas fa-mobile-alt text-purple-500 mr-1"></i>
                        {$Think.lang.feature_responsive_design}
                    </span>
                </div>
            </div>
        </div>

        <div class="mt-16 bg-gradient-to-br from-cyan-50 to-blue-50 rounded-3xl p-8">
            <div class="text-center mb-10">
                <h3 class="text-2xl font-bold mb-4 text-gray-800">{$Think.lang.additional_features_title}</h3>
                <p class="text-gray-600">{$Think.lang.additional_features_subtitle}</p>
            </div>
            
            <div class="grid grid-cols-2 md:grid-cols-4 gap-6">
                <div class="text-center p-4 bg-white rounded-xl shadow-sm hover:shadow-md transition-shadow duration-300">
                    <div class="w-12 h-12 mx-auto mb-3 bg-gradient-to-br from-blue-500 to-cyan-500 rounded-lg flex items-center justify-center">
                        <i class="fas fa-volume-up text-white text-lg"></i>
                    </div>
                    <h4 class="font-semibold text-gray-800 mb-1">{$Think.lang.feature_pronunciation_guide}</h4>
                    <p class="text-gray-600 text-sm">{$Think.lang.feature_pronunciation_desc}</p>
                </div>
                
                <div class="text-center p-4 bg-white rounded-xl shadow-sm hover:shadow-md transition-shadow duration-300">
                    <div class="w-12 h-12 mx-auto mb-3 bg-gradient-to-br from-green-500 to-emerald-500 rounded-lg flex items-center justify-center">
                        <i class="fas fa-download text-white text-lg"></i>
                    </div>
                    <h4 class="font-semibold text-gray-800 mb-1">{$Think.lang.feature_offline_download}</h4>
                    <p class="text-gray-600 text-sm">{$Think.lang.feature_offline_desc}</p>
                </div>
                
                <div class="text-center p-4 bg-white rounded-xl shadow-sm hover:shadow-md transition-shadow duration-300">
                    <div class="w-12 h-12 mx-auto mb-3 bg-gradient-to-br from-orange-500 to-red-500 rounded-lg flex items-center justify-center">
                        <i class="fas fa-bookmark text-white text-lg"></i>
                    </div>
                    <h4 class="font-semibold text-gray-800 mb-1">{$Think.lang.feature_bookmark}</h4>
                    <p class="text-gray-600 text-sm">{$Think.lang.feature_bookmark_desc}</p>
                </div>
                
                <div class="text-center p-4 bg-white rounded-xl shadow-sm hover:shadow-md transition-shadow duration-300">
                    <div class="w-12 h-12 mx-auto mb-3 bg-gradient-to-br from-indigo-500 to-purple-500 rounded-lg flex items-center justify-center">
                        <i class="fas fa-share-alt text-white text-lg"></i>
                    </div>
                    <h4 class="font-semibold text-gray-800 mb-1">{$Think.lang.feature_sharing}</h4>
                    <p class="text-gray-600 text-sm">{$Think.lang.feature_sharing_desc}</p>
                </div>
            </div>
        </div>
    </div>
</section>

<section class="bg-gradient-to-br from-cyan-50 to-blue-50 py-20">
    <div class="container mx-auto px-4">
        <div class="text-center mb-16">
            <h2 class="text-3xl md:text-4xl font-bold mb-4 gradient-text">{$Think.lang.faq_title}</h2>
            <p class="text-gray-600 text-lg max-w-2xl mx-auto">Everything you need to know about our pinyin lyrics service</p>
        </div>
        <div class="max-w-4xl mx-auto">
            <div class="mb-6">
                <div class="flex justify-between items-center bg-white p-6 rounded-xl shadow-md cursor-pointer faq-question hover:shadow-lg transition-all duration-300">
                    <h3 class="text-lg font-semibold text-gray-800">{$Think.lang.faq_q1}</h3>
                    <i class="fas fa-chevron-down text-cyan-500 transition-transform duration-300"></i>
                </div>
                <div class="bg-white px-6 pb-6 rounded-b-xl shadow-md faq-answer hidden">
                    <p class="text-gray-600 pt-4 leading-relaxed">{$Think.lang.faq_a1}</p>
                </div>
            </div>
            
            <div class="mb-6">
                <div class="flex justify-between items-center bg-white p-6 rounded-xl shadow-md cursor-pointer faq-question hover:shadow-lg transition-all duration-300">
                    <h3 class="text-lg font-semibold text-gray-800">{$Think.lang.faq_q2}</h3>
                    <i class="fas fa-chevron-down text-cyan-500 transition-transform duration-300"></i>
                </div>
                <div class="bg-white px-6 pb-6 rounded-b-xl shadow-md faq-answer hidden">
                    <p class="text-gray-600 pt-4 leading-relaxed">{$Think.lang.faq_a2}</p>
                </div>
            </div>
            
            <div class="mb-6">
                <div class="flex justify-between items-center bg-white p-6 rounded-xl shadow-md cursor-pointer faq-question hover:shadow-lg transition-all duration-300">
                    <h3 class="text-lg font-semibold text-gray-800">{$Think.lang.faq_q3}</h3>
                    <i class="fas fa-chevron-down text-cyan-500 transition-transform duration-300"></i>
                </div>
                <div class="bg-white px-6 pb-6 rounded-b-xl shadow-md faq-answer hidden">
                    <p class="text-gray-600 pt-4 leading-relaxed">{$Think.lang.faq_a3}</p>
                </div>
            </div>
            
            <div class="mb-6">
                <div class="flex justify-between items-center bg-white p-6 rounded-xl shadow-md cursor-pointer faq-question hover:shadow-lg transition-all duration-300">
                    <h3 class="text-lg font-semibold text-gray-800">{$Think.lang.faq_q4}</h3>
                    <i class="fas fa-chevron-down text-cyan-500 transition-transform duration-300"></i>
                </div>
                <div class="bg-white px-6 pb-6 rounded-b-xl shadow-md faq-answer hidden">
                    <p class="text-gray-600 pt-4 leading-relaxed">{$Think.lang.faq_a4}</p>
                </div>
            </div>
        </div>
    </div>
</section>
{/block}

{block name="script"}
<script>
    window.SEARCH_PROGRESS_TIME = {$search_progress_time};
    window.JS_LANGS = {$js_langs};
</script>
<script src="/static/js/index.js?v=13"></script>
{/block}